{% load ifpermit %}

<div class="groupbody" id="groupbody{{group.id}}">

<div class="folderheader" id="groupheader{{group.id}}">
<div class="folderheadertext">{{group.title}}. 
{% ifnotequal rights "N" %}
you're {{ rights|full_right }} of this group
{% endifnotequal %}
</div>

<div class="smallbutton" onclick="javascript:$('.leftpart').load('/group/{{group.id}}/folders');">folders</div>
<div class="smallbutton" onclick="javascript:$('.leftpart').load('/group/{{group.id}}/users');">users</div>
<div class="smallbutton" onclick="javascript:$('.leftpart').load('/group/{{group.id}}/topics');">topics</div>

{% ifequal rights "N" %}
<div class="smallbutton" onclick="javascript:subscribe_group({{group.id}});">subscribe</div>
{% endifequal %}
{% ifequal rights "R" %}
<div class="smallbutton" onclick="javascript:unsubscribe_group({{group.id}});">unsubscribe</div>
{% endifequal %}

<!--div class="smallbutton" id="togglegroup{{group.id}}" onclick="javascript:togglegroup({{group.id}});">hide</div>
<div class="smallbutton" onclick="javascript:updategroup({{group.id}});">update</div-->
{% ifpermit rights C %}
<div class="smallbutton" onclick="javascript:purgegroup({{group.id}});">purge</div>
{% endifpermit %}
</div>
</div>